<?php

require_once 'db.php';

class Keywords extends Db {

    public function select() {
        $this->getconnection();
        $query = 'SELECT * FROM keywords';
        $keywords = $this->query($query);
        return $keywords;
    }

    public function maxlength() {
        $this->getconnection();
        $query = 'SELECT * FROM keywords';
        $keywords = $this->query($query);
        foreach ($keywords as $keyword){
            if(strlen($keyword['name']) >10){
                echo $keyword['id'].":";
                echo $keyword['name']."<br>";
            }
        }
    }

}
